define(['template','jquery'],(template) =>{
	class Service{
		constructor() {
		    this.loadHTML()
			this.getTab()
			this.getHover()
		}
		loadHTML(){
			return new Promise((resolve,reject) =>{
				$('.service').load('/html/modules/service.html',() =>{
					
				})
			})
		}
		getTab(){
			$.get('http://www.xiongmaoyouxuan.com/api/search?word=%E6%89%8B%E5%8A%9E&start=0&sort=0&couponOnly=0&minPrice=0&maxPrice=99999',resp =>{
				if(resp.code === 200){
					let {list} = resp.data
					list = list.slice(0,6)
					$('#itemList').html(template('itemListTemplate', {list}))
					
				}
			})
		}
	getHover(){
		
		$('.right-img').on("mouseenter" , () =>{
			$('.right-top').children('.right-monu').show()
		})
	}
	}
	return new Service()
})